import {defineStore} from 'pinia'
import type{ILoginList} from '../types/type'
export const UserLoginAccount=defineStore('login',{
    state() {
        return{
            account:{id:'',name:'',url:''}
        }
    },
    actions:{
        saveAccount(list:ILoginList){
            this.account=list
        }
    },
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'login',
                storage: localStorage,
                paths: ['account'],
            },
        ],
    },
})